//
//  AppDelegate.m
//  PostMessa
//
//  Created by never down on 15-5-12.
//  Copyright (c) 2015年 ygy_ios. All rights reserved.
//

#import "AppDelegate.h"
#import "ViewController.h"
#import "baseViewController.h"
#import "DBManager.h"
#import "PostMessa-Prefix.pch"
@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;//UIStatusBarStyleLightContent;//;
    
    if (FALSE) {
        ViewController *rootViewCtrl = [[ViewController alloc] init];
        self.window.rootViewController = rootViewCtrl;
    } else {
        baseViewController *rootViewCtrl = [[baseViewController alloc]init];
        UINavigationController *homeNavigation = [[UINavigationController alloc]initWithRootViewController:rootViewCtrl];
        self.window.rootViewController = homeNavigation;
        homeNavigation.navigationBarHidden = YES;
    }
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application {
    
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    
}

- (void)applicationWillTerminate:(UIApplication *)application {
   
}
/*
//检查更新
- (void)checkVersion
{
    //开启iphone网络开关
    //    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
    //
    //    ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:APP_URL];
    //    [request setRequestMethod:@"POST"];
    //    [request setDelegate:self];
    //    [request setTimeOutSeconds:150];
    //    [request startAsynchronous];
    //    [self requestFinished:request];
    
    
    
}
*/

/*
- (void)requestFinished:(ASIHTTPRequest *)request
{
    NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:[request responseData] options:NSJSONReadingMutableLeaves error:nil];
    NSString *version = [dict objectForKey:@""];
    NSLog(@"%@",version);
    
    
    [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
}
 */
@end
